package controller.listeners.manualCode;



import model.ManualCodeModel;

import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

import view.ManualCodeView;

/**
 * Controlador de la tabla de centros candidatos del corp seleccionado
 * @author 53385255R
 *
 */
public class CandidateCentersSelectionListener implements Listener {


	private ManualCodeView _view;
	private ManualCodeModel _model;
	
			/**
			 * Constructor
			 * @param view
			 * @param model
			 */
			public CandidateCentersSelectionListener(ManualCodeView view,
					ManualCodeModel model) {
				this._model = model;
				this._view = view;
			}
			
			/**
			 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
			 */
			public void handleEvent(Event event) {
				String center_code = _view.getSelectedCorpCodeFromCandidateCenters();
				_model.setSelected_candidate_center_code(center_code);
			}
		}